package com.youlai.boot.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.youlai.boot.system.mapper.QanalyzeMapper;
import com.youlai.boot.system.model.QB.Qanalyze;
import com.youlai.boot.system.service.QanalyzeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;
@Service
public class QanalyzeServiceImpl extends ServiceImpl<QanalyzeMapper, Qanalyze> implements QanalyzeService {
    @Autowired
    private QanalyzeMapper qanalyzeMapper;
    @Override
    public boolean saveQanalyze(Qanalyze qanalyze) {
        qanalyze.setAddtime(LocalDateTime.now());
        return save(qanalyze);
    }

    @Override
    public List<Qanalyze> getAllQanalyze() {
        return qanalyzeMapper.selectList(null);
    }

    @Override
    public boolean deleteQanalyzeById(Integer id) {
        return qanalyzeMapper.deleteById(id)>0;
    }
}
